package Test_319_2;

public class Vehicle {

    //属性
    String brand;//汽车品牌
    String color;//汽车颜色
    double speed;//汽车速度

    //getter和setter

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }


    //创建有参数的构造方法
    public Vehicle(String brand , String color){
        this.brand = brand;
        this.color = color;
        System.out.println("汽车品牌为"+brand+"颜色是"+color+"车速是"+speed);
    }

    //run方法
    public  static  void run(){

        System.out.println("this is running.................");
    }
}
